package com.jwell.driverapp.retrofit

import com.google.gson.JsonObject
import com.jwell.panrank.model.*


import io.reactivex.Flowable
import okhttp3.MultipartBody
import retrofit2.http.*

/**
 * 地址
 */
interface ApiStore {

    //上传图片
    @Multipart
    @POST("api/Upload/Process")
    fun upLoadPic(@Part file: MultipartBody.Part): Flowable<JsonObject>

    //登录
    @POST("api/AdminAccount/Login")
    fun login(@Body parameter: LoginModel.RequestData): Flowable<JsonObject>

    //电子磅单查询
    @POST("api/services/app/queuingSystems/GetElectronicListPage")
    fun getElectronicListPag(@Body parameter: ElectronicPoundModel.RequestData): Flowable<JsonObject>

    //预登记
    @POST("api/services/app/queuingSystems/CreateFroExportWaybill")
    fun createFroExportWaybill(@Body parameter: PreRegisterModel.RequestData): Flowable<JsonObject>

    //创建预登记验收计划
    @POST("api/services/app/queuingSystems/CreateFuelPlan")
    fun createFuelPlan(@Body parameter: PreRegisterPlaneModel.RequestData): Flowable<JsonObject>

    //获取产品查询
    @POST("api/services/app/queuingSystems/AppGetProList")
    fun appGetProList(@Body parameter: SearchModel.GoodsNameData): Flowable<JsonObject>


    //收发货单位
    @POST("api/services/app/queuingSystems/AppGetUnitInformationList")
    fun appGetUnitInformationList(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //司机搜索
    @POST("api/services/app/queuingSystems/GetDriverList")
    fun getDriverList(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //卸料确认，二维码扫描后调用
    @POST("api/services/app/queuingSystems/Unloading")
    fun unloading(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //根据品名查询合同信息
    @POST("api/services/app/queuingSystems/GetContractListByProName")
    fun getContractListByProName(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //预登记验收计划选择合同号
    @POST("api/services/app/queuingSystems/GetContractList")
    fun getContractList(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //验证车牌号
    @POST("api/services/app/queuingSystems/CheckCarNum")
    fun checkCarNum(@Body parameter: Map<String, String>): Flowable<JsonObject>

    //验证驾驶员是否存在，根据手机号验证
    @POST("api/services/app/queuingSystems/CheckDriverPhone")
    fun checkDriverPhone(@Body parameter: Map<String, String>): Flowable<JsonObject>

    //验证收发货单位权限
    @POST("api/services/app/queuingSystems/CheckUnit")
    fun checkUnit(@Body parameter: Map<String, String?>): Flowable<JsonObject>

    //验证用户权限
    @POST("api/services/app/queuingSystems/GetPermissionsStrByUserId")
    fun checkUserPermission(): Flowable<JsonObject>

    //重置密码发送短信验证码
    @POST("api/services/app/queuingSystems/RegSendMsg")
    fun regSendMsg(@Body parameter: ForgetPasswordModel.RegSendMsg): Flowable<JsonObject>

    //用户重置密码
    @POST("api/services/app/queuingSystems/UserRegPwd")
    fun userRegPwd(@Body parameter: ForgetPasswordModel.UserRegPwd): Flowable<JsonObject>

    //查询运单分页数据
    @POST("api/services/app/queuingSystems/GetForExportWaybillPage")
    fun getForExportWaybillPage(@Body parameter: WaybillModel.RequestData): Flowable<JsonObject>

    //运单详情
    @POST("api/services/app/queuingSystems/GetForExportWaybillById")
    fun getForExportWaybillById(@Body parameter: Map<String, Int>): Flowable<JsonObject>

    //撤销运单
    @POST("api/services/app/queuingSystems/RevokeWaybill")
    fun revokeWaybill(@Body parameter: Map<String, Int>): Flowable<JsonObject>

    //获取卸车点数据
    @POST("api/services/app/queuingSystems/GetUnloadingPoint")
    fun getUnloadingPoint(): Flowable<JsonObject>

    //获取车辆查询数据
    @POST("api/services/app/queuingSystems/GetBillStateCount")
    fun getBillStateCount(): Flowable<JsonObject>

    //获取所有计量点
    @POST("api/services/app/queuingSystems/GetMeasurePlaceList")
    fun getMeasurePlaceList(): Flowable<JsonObject>

    //获取马坎数据 /api/services/app/queuingSystems/GetMklcStatistics
    @POST("api/services/app/queuingSystems/GetMklcStatistics")
    fun getMaKanCount(): Flowable<JsonObject>

    //获取手机验证码
    @POST("api/AdminAccount/LoginByPhoneCode")
    fun loginByPhoneCode(@Body parameter: LoginModel.RequestLoginByPhone): Flowable<JsonObject>

    //获取手机验证码
    @POST("api/services/app/queuingSystems/SendMsgCode")
    fun sendMsgCode(@Body parameter: LoginModel.RequestSendMsg): Flowable<JsonObject>

}
